import request from '../utils/request'  // 导入的是直接可调用的函数
export default{
  getAllActionList(){
    return request({
      url:'/action/list',
      method:'get'
    })
  },
  getActionDetailsById(id){
    return request({
      url:'/action/'+id,
      method:'get'
    })
  },
  //进行活动报名
  siginUpAction(data){
    return request({
      url:'/actionOrder/signUp',
      method:'post',
      data:data
    })
  },

  //获取我的订单
  getMyOrder(){
    return request({
      url:'/actionOrder/getMyOrder',
      method:'get'
    })
  },
  //获取订单详细信息
  getOneOrderDetails(orderId){
    return request({
      url:'/actionOrder/getOrderById/' + orderId,
      method:'get'
    })
  },
  //进行订单的支付
  payOrder(orderId){
    return request({
      url:'/actionOrder/payOrder',
      method:'put',
      data:orderId
    })
  }
}